﻿@using WorkBasket.Data.Entities

@model  WorkBasket.Models.DashModel
 
@section Scripts{
    <script src="~/Scripts/app/Dash/DashController.js"></script>
}
 <div class="container" ng-controller="wbDashCTRL" ng-cloak> 
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#"><span class="glyphicon glyphicon-dashboard"></span>&nbsp;Dashboard </a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a href="/design/design"><span class="glyphicon glyphicon-wrench"></span></a></li>
                    <li><a href="#" title="Administration"><span class="glyphicon glyphicon-briefcase" /></a></li>
                    <li><a href="#" title="Invitations" data-toggle="modal" data-target="#Invitations"><span class="glyphicon glyphicon-envelope"></span>&nbsp; <span class="badge" ng-hide="NewInvitations.length<=0">{{NewInvitations.length}} </span></a></li>
                    <li><a href="#" title="Messages"><span class="glyphicon glyphicon-comment"></span>&nbsp;<span class="badge">2</span></a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Businesses <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">Some Business</a></li>
                            <li><a href="#">Another Business</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li class="divider"></li>
                            <li><a href="#">View my work</a></li>
                            <li><a href="#">View my submissions</a></li>
                            <li class="divider"></li>
                            <li><a href="#">Reports</a></li>
                        </ul>
                    </li>
                </ul>
                <form class="navbar-form navbar-right" role="search">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search">
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>

            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
    <div class="row">
        <div class="col-md-12">
            To Do Items go here
        </div>
  
    </div>
      <!--Models-->
<!--Invite Modal -->
    <div class="modal fade" id="Invitations" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="myModalLabel">Invitations</h4>
                </div>
                <div class="modal-body">
                    <ul ng-repeat="Invite in NewInvitations">
              
                        <li class="alert alert-info">
                            {{Invite.SentBy}} has invited you to join {{Invite.UnitName}} as a --Todo: create Roles for invites--
                            <button class="btn btn-sm btn-success" ng-click="Accept( Invite,true)"><span class="glyphicon glyphicon-check"></span></button>
                            <button class="btn btn-sm btn-danger" ng-click="Accept( Invite,false)"><span class="glyphicon glyphicon-trash"></span></button>
                        </li> 
                       </ul>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
             
                </div>
            </div>
        </div>
    </div>
</div>